package com.hyt.it.ogt.kq.service.gov.schedule.impl.support;

import com.hyt.it.ogt.kq.service.gov.schedule.model.ScheduleConstrain;

public class CandidateTotegherFactory {
    public static CandidateTogether getHandler(ScheduleConstrain scheduleConstrain) {
        if (scheduleConstrain.isMainTainPosition()) {
            if (scheduleConstrain.isSingleSubject()) {
                return new CandidateSingleAndMainten();
            } else {
                return new CandidateMulAndMainten();
            }
        } else {
            if (scheduleConstrain.isSingleSubject()) {
                return new CandidateSingleAndNoMainten();
            } else {
                return new CandidateMulAndNoMainten();
            }
        }
    }
}
